% V20210224 - 11.7 GW_CUSTO_DLGBTN INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. Title$ = GW_ADD_BAR_TITLE$("Dialog Custo Example") % Add title to page. GW_ADD_TITLEBAR(p,Title$) % Add descriptive text. GW_ADD_TEXTBOX(p, "This is an example of the DIALOG buttons customization:") % Add button to activate the dialog. GW_ADD_BUTTON(p, "Let's do this!", "show") % Add a text area. tt = GW_ADD_TEXTBOX(p, "Dialog not displayed") % Let's prepare the dialog. ARRAY.LOAD a$[], "OK>done", "Not OK>cancel" GW_USE_THEME_CUSTO_ONCE("inline") % make it have inline buttons Dlg = GW_ADD_DIALOG_MESSAGE(p, "My Dialog", "A message from our sponsor", a$[]) % And customize its buttons retrospectively. GW_CUSTO_DLGBTN(p, Dlg, a$[1], "icon=check") % OK GW_CUSTO_DLGBTN(p, Dlg, a$[2], "icon=alert iconpos=left style='background:red; color:white'") % Not OK % Now show the page. GW_RENDER(p) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Parse user action. SW.BEGIN r$ % Test for button press. SW.CASE "show" GW_SHOW_DIALOG(Dlg) SW.BREAK % Test for first dialog pick. SW.CASE "done" POPUP "OK was picked" SW.BREAK % Test for second dialog pick. SW.CASE "cancel" POPUP "Not OK was picked" SW.BREAK SW.END % End when BACK key is pressed. UNTIL r$ = "BACK" END "End of Dialog Custo example."